package com.spring.component.test.clone;

/**
 * @author liushihua
 * @since 2018年04月18日
 */
public class Asian {
  private String skin;
  private Person person;

  public Asian() {}

  public Asian(String skin, Person person) {
    this.skin = skin;
    this.person = person;
  }

  public Asian(Asian asian) {
    this.skin = asian.getSkin();
    // 浅拷贝
    this.person = asian.getPerson();
    // 深拷贝
    // this.person = new Person(asian.getPerson());
  }



  public String getSkin() {
    return skin;
  }

  public void setSkin(String skin) {
    this.skin = skin;
  }

  public Person getPerson() {
    return person;
  }

  public void setPerson(Person person) {
    this.person = person;
  }

  @Override
  public String toString() {
    return "Asian{" + "skin='" + skin + '\'' + ", person=" + person + '}';
  }

}
